-- 此处为nLog功能实现操作
nLog = require('nLog')()

require('faker')
require('xxtsp')



address ={
	
	
{"力士沐浴露幽莲魅肤精油香氛沐浴乳","1","79.1","吴梅","福建晋江青阳福隆广场1期5栋1712","18050979819",},
{"flyco 飞科 静音电动剃须刀FS361充电式电动带鬓角刮胡须子刀","1","64.05","袁田方","河南省周口市商水县袁庄乡","15559116895",},
{"美的（Midea）智能预约多功能电饭煲FS4017","1","269.8","耀斌","福建省泉州市惠安县海城园林天下","18150977705",},
{"苏泊尔（SUPOR）电压力锅2.5L","1","292.45","玉凌","福建省泉州市惠安县霞张红联幼儿园对面豆腐店","13489256320",},
{"美的（Midea）触摸家用爆炒电磁炉RT2170","1","266.5","玉凌","福建省泉州市惠安县霞张红联幼儿园对面豆腐店","13489256320",},
{"嘉宝创意电动车披风","1","50.15","彭森生","福建省泉州市鲤城区侨乡商品1-313号","15280889719",},
{"魔胄超萌卡通迷你充电宝","2","83.3","贾静晓","上海市浦东新区川沙镇新川路768号","13511645365",},
{"力士沐浴露幽莲魅肤精油香氛沐浴乳","1","79.1","吴梅","福建晋江青阳福隆广场1期5栋1712","18050979819",},
{"美的（Midea）迷你2.5L电压力锅PSS2501P","1","357.5","任光翠","福建省泉州市惠安县海城园林天下8号楼805室","15280471856",},
{"日本进口花王牙膏165g*3","2","83.3","吴征明","贵州省安顺市蔡官镇新路口北斗小区2单元601室","13098532249",},
{"flyco 飞科 静音电动剃须刀FS361充电式电动带鬓角刮胡须子刀","1","64.05","袁田方","河南省周口市商水县袁庄乡","15559116895",},
{"苏泊尔（SUPOR）电压力锅2.5L","2","584.9","任光翠","福建省泉州市惠安县海城园林天下8号楼805室","15280471856",},
{"力士沐浴露幽莲魅肤精油香氛沐浴乳","1","79.1","吴梅","福建晋江青阳福隆广场1期5栋1712","18050979819",},
{"flyco 飞科 静音电动剃须刀FS361充电式电动带鬓角刮胡须子刀","1","64.05","张永庆","河南省周口市商水县平店乡","17643177054",},
{"【20支】韩国RAOYI小麦秸秆牙刷","2","83.3","吴征明","贵州省安顺市蔡官镇新路口北斗小区2单元601室","13098532249",},
{"苏泊尔（SUPOR）电压力锅2.5L","2","584.9","何碧硕","福建省泉州市惠安县霞张红联幼儿园对面豆腐店","13489256752",},
{"美的（Midea）1.5L不锈钢双层防烫电水壶H215E4A","2","266.6","烨彬","福建省泉州市惠安县海城园林天下8号楼805室","15285443712",},
{"美的（Midea）智能预约多功能电饭煲FS4017","1","269.8","维津","福建省泉州市惠安县峰崎村香格里茶业隔壁服装店","15880920275",},
{"flyco 飞科 静音电动剃须刀FS361充电式电动带鬓角刮胡须子刀","1","64.05","张永庆","河南省周口市商水县平店乡","17643177054",},
{"美的（Midea）触摸家用爆炒电磁炉RT2170","1","266.5","何碧硕","福建省泉州市惠安县霞张红联幼儿园对面豆腐店","13489256752",},
{"嘉宝创意电动车披风","1","50.15","维津","福建省泉州市惠安县峰崎村香格里茶业隔壁服装店","15880920275",},
{"美的（Midea）迷你2.5L电压力锅PSS2501P","1","357.5","烨彬","福建省泉州市惠安县海城园林天下8号楼805室","15285443712",},
{"美的（Midea）智能预约多功能电饭煲FS4017","1","269.8","何玉雪","福建省泉州市惠安县海城园林天下","13459555934",},
{"【20支】韩国RAOYI小麦秸秆牙刷","2","83.3","吴征明","贵州省安顺市蔡官镇新路口北斗小区2单元601室","13098532249 ",},
{"苏泊尔（SUPOR）电压力锅2.5L","2","584.9","何玉雪","福建省泉州市惠安县海城园林天下","13459555934",},
{"美的（Midea）触摸家用爆炒电磁炉RT2170","2","533","阿林","福建省泉州市惠安县海城园林天下","18359841128",},
{"SPIRITKIDS印花全棉浴巾","1","75.65","彭森生","福建省泉州市鲤城区侨乡商品1-313号","15280889719",},
{"苏泊尔（SUPOR）电压力锅2.5L","2","584.9","阿林","福建省泉州市惠安县海城园林天下","18359841128",},


}


t={}
t.搜索界面={{{44,84,0x4c4c4c},{568,82,0x5f5f5f},{563,70,0xfefefe},{137,80,0xeeeeee},},85}
t.提交订单界面={{{531,1074,0xffd34f},{537,1069,0x464235},{336,1062,0x333333},{346,1069,0xf6f6f6},}, 85, 227, 1005, 633, 1130}
	t.提交订单界面_请填写收件地址={{{200,166,0xff5c35},{200,153,0xff5e38},{200,178,0xff5e38},}, 85, 10, 138, 241, 198}
t.提交订单界面_新增地址按钮={{{392,1099,0xffda4b},{34,1093,0xffda4b},{289,1052,0xffda4b},{315,1100,0x4c4c4c},}, 85, 16, 1033, 623, 1133}
	t.提交订单界面_新增地址按钮_已经有地址={{{38,349,0x4c4c4c},{38,358,0xffdb4c},{39,334,0xffdb4c},}, 85, 16, 146, 83, 595}
t.提交订单界面_新增地址界面={{{564,87,0x616161},{562,83,0xfbfbfb},{353,84,0x4c4c4c},{351,84,0xfefefe},{352,97,0x4c4c4c},},85}
	
t.闪降首页_商城={{{318,1065,0xf6f6f8},{59,1066,0xffdb4c},{422,283,0xff4f20},},85}
	t.闪降首页_GO={{{582,567,0xfd6d0d},{586,567,0xffe4cf},{594,567,0xfd770e},{577,547,0xff9b58},}, 85, 519, 497, 634, 629}
	t.新人惊喜大转盘={{{567,85,0x3b0303},{533,82,0x3b0303},{208,80,0x4c4c4c},{139,91,0x676767},{130,92,0xffffff},},85}
	t.抽奖={{{239,1039,0xa26009},{237,1034,0xfadb3e},{240,1012,0xfcf060},{234,1056,0xf8ce2a},}, 85, 195, 1006, 410, 1065}

t.商城_点击搜索={{{582,80,0xffffff},{590,91,0x4c4c4c},{318,1065,0xffdb4c},{61,1071,0xf9f9f9},},85}

t.主界面_我={{{56,1086,0x4c4c4c},{576,1072,0xffdb4c},{190,1073,0x515151},{191,1073,0xf9f9f9},},85}
	


function add_address()
	local input_key = true
	local have_vip = true
	local cj = 0
	
	while true do
		if d(t.搜索界面,"t.搜索界面")then
			click(510, 85)
			input(address[key][1])
			click(559, 1088)
			delay(10)
		elseif d(t.主界面_我,"t.主界面_我",true)then
			
		elseif d(t.提交订单界面,"t.提交订单界面")then
			if d(t.提交订单界面_请填写收件地址,"t.提交订单界面_请填写收件地址",true)then
			elseif d(t.提交订单界面,"t.提交订单界面",true)then
			end
		elseif d(t.提交订单界面_新增地址按钮,"t.提交订单界面_新增地址按钮")then
			delay(3)
			if d(t.提交订单界面_新增地址按钮_已经有地址,"t.提交订单界面_新增地址按钮_已经有地址")then
				sys.alert("地址完成",1)
				os.exit()
			elseif d(t.提交订单界面_新增地址按钮,"t.提交订单界面_新增地址按钮",true)then
			end
			
			
		elseif d(t.提交订单界面_新增地址界面,"t.提交订单界面_新增地址界面")then
			if input_key then
				click(599,163)
				input(address[key][4])
				click(614, 243)
				input(address[key][6])
				
				click(495,321)
				click(357, 477)
				input(address[key][5])
				delay(10)
				input_key = false
				os.exit()
			end
		elseif have_vip and d(t.闪降首页_商城,"闪降首页_商城")then
			if d(t.闪降首页_GO,"t.闪降首页_GO",true)then
				
			end
		elseif d(t.新人惊喜大转盘,"t.新人惊喜大转盘")then
			if cj < 2 then
				if d(t.抽奖,"t.抽奖",true)then
					cj = cj + 1
					delay(5)
				else
					click(330, 858)
				end
			else
				click(40,80)
				have_vip = false
			end
			
		elseif d(t.闪降首页_商城,"闪降首页_商城",true)then
			
		elseif d(t.商城_点击搜索,"商城_点击搜索",true)then
			
		end
		delay(1)
	end
end

-- XXTfakerNewPhone(app.front_bid())
--[[]]

key = 8
add_address()

--]]












































